﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Repass.aspx.cs" Inherits="Repass" %>

	<!-- Bootstrap -->
	<link href="/Public/Home_v2/css/bootstrap.min.css" rel="stylesheet">
	<link href="/Public/Home_v2/css/bootstrap-theme.css" rel="stylesheet">
	<link rel="stylesheet" href="/Public/Home/css/colorbox.css" />
	<link href="/Public/Home_v2/css/toastr.min.css" rel="stylesheet">
	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
	<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->

	<div class="Member_content">
		<div class="col-sm-12">
			<div class="container" style="margin-top:20px;">
				<div class="panel" style="background-color:#d4dfe8;border:none;border-radius:0;">
					<div class="panel-body">
						<div class="tab-content nav-search-tabs-content">							
							<div role="tabpanel" class="tab-pane active" id="search-el">
								<form class="form-inline search-form" name="search-electronic" action="/Repass.aspx">
									<div class="form-group" style="height: 46px;">
										<div class="input-group" style="width:485px;height: 42px">
											<span class="input-group-addon" style="width:125px;height: 42px;">账    号：</span>
											<input type="text" class="form-control" name="EntName" value="<%=EnterpriseName %>" readonly placeholder="企业账号" aria-describedby="basic-addon1">
										</div>
									</div><br/>

									<div class="form-group" style="height: 46px;">
										<div class="input-group" style="width:485px;height: 42px;">
											<span class="input-group-addon" style="width:125px;height: 42px;">原密码：</span>
											<input type="password" id="oldpass" class="form-control" name="oldpass" value="" placeholder="原密码" />
										</div>
									</div><br/>

                                    <div class="form-group" style="height: 46px;">
										<div class="input-group" style="width:485px;height: 42px;">
											<span class="input-group-addon" style="width:125px;height: 42px;">新密码：</span>
											<input type="password" id="newpass" class="form-control" name="newpass" value="" placeholder="新密码" />
										</div>
									</div><br/>

                                    <div class="form-group" style="height: 46px;">
										<div class="input-group" style="width:485px;height: 42px;">
											<span class="input-group-addon" style="width:125px;height: 42px;">确认密码：</span>
											<input type="password" id="repass" class="form-control" name="repass" value="" placeholder="确认密码" />
										</div>
									</div><br/>

									<div class="form-group">
                                        <div class="form-group-sm">
                                            <input class="btn-search" type="button" id="sub_bt"  back_url="/Repass.ashx"  value="确认修改">
                                        </div>										
									</div>
								</form>
							</div>
						</div>						
				</div>
			</div>
                <%=Footer %>
		</div>
	</div>
</div>
        <script src="Public/Home/js/jquery1.7.2.js"></script>
        <script>
            $('#sub_bt').click(function () { req_ajax() });
            $('#repass').keydown(function (e) { if (e.keyCode == 13) req_ajax() });
            function req_ajax() {
                var oldpass = $('#oldpass').val();
                var newpass = $('#newpass').val();
                var repass = $('#repass').val();
                var posturl = $('#sub_bt').attr('back_url');
                $.ajax({
                    url: posturl,
                    type: 'POST',
                    dataType: 'JSON',
                    data: { oldpass: oldpass, newpass: newpass, repass: repass },
                    success: function (msg) {
                        if (msg.code != 200) {
                            alert(msg.msg);
                        } else {
                            alert(msg.msg);
                            window.location.href = msg.forward;
                        }
                    }, error: function (msg) { alert('登录失败，请检查网络后重试！' + msg.code); }
                });
            }
        </script>
</body>
</html>